﻿using System;
using System.Windows.Forms;

using Jeffrey.XFramework.XCrawl;
using Jeffrey.XFramework.XManager;
using Jeffrey.XProcess;

namespace Jeffrey.Xuthus
{
    static class Xuthus
    {
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            CrawlController ccon = new CrawlController( new CrawlOrder(), 
                                                        new MemoryUriContainer(),
                                                        new MemoryUriContainer()
                                                       );
            XController xc = new XController(ccon);

            if (!xc.Initialize())
            {
                MessageBox.Show("Error occurred in Xuthus's initialization!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            Application.Run(xc.MainForm);
        }
    }
}
